package com.songjiakang.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.songjiakang.dao.HomeDao;
import com.songjiakang.entity.Home;

@Service
public class HomeServiceImp implements HomeService{
	@Autowired
	private HomeDao dao;
	//列表
	public PageInfo list(Integer pageNum, Integer pageSize,Home home) {
		PageHelper.startPage(pageNum, pageSize);
		List<Home> list=dao.list(home);
		PageInfo info = new PageInfo(list);
		return info;
	}
	//删除
	public Boolean del(Integer id) {
		// TODO Auto-generated method stub
		return dao.del(id);
	}
	//退租
	public void tui(Integer id) {
		// TODO Auto-generated method stub
		dao.tui(id);
	}
	//出租
	public void chu(Integer id) {
		// TODO Auto-generated method stub
		dao.chu(id);
	}
}
